package com.edu.imau.FixedParking;

import com.edu.imau.ParkingDao;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.ArrayList;

@WebServlet("/Fixed2")
public class Fixed2Servlet extends HttpServlet {
    private ParkingDao dao = new ParkingDao();

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //1:处理参数

        //2 调用model
        ArrayList<Fixed> list = dao.getFixedAll();
        //3；展示数据View
        request.setAttribute("data2", list);
        request.getRequestDispatcher("Fixed2.jsp").forward(request, response);
    }
}
